package com.prj.service.impl;
import com.prj.domain.EmpWork;
import com.prj.mapper.EmpWorkMapper;
import com.prj.service.IEmpWorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class EmpWorkServiceImpl implements IEmpWorkService
{
    @Autowired
    private EmpWorkMapper empWorkMapper;

    @Override
    public List<EmpWork> selectEmpWorkById(Long id)
    {
        return empWorkMapper.selectEmpWorkById(id);
    }

    @Override
    public List<EmpWork> selectEmpWorkList(EmpWork empWork)
    {
        return empWorkMapper.selectEmpWorkList(empWork);
    }

    @Override
    public int insertEmpWork(EmpWork empWork)
    {
        empWork.setCreateTime(new Date());
        return empWorkMapper.insertEmpWork(empWork);
    }

    @Override
    public int updateEmpWork(EmpWork empWork)
    {
        return empWorkMapper.updateEmpWork(empWork);
    }

    @Override
    public int deleteEmpWorkByIds(Long[] ids)
    {
        return empWorkMapper.deleteEmpWorkByIds(ids);
    }

    @Override
    public int deleteEmpWorkById(Long id)
    {
        return empWorkMapper.deleteEmpWorkById(id);
    }
}
